package lovoStudy_9_7.StudentManage;

import java.util.Objects;

/**
 * Created with Intellij IDEA
 * Description:
 *
 * @ return:
 * @ author:zxl
 */
public class Student{
    private String name;
    private String age;
    private String gender;

    public Student(){

    }
    public Student(String name){
        this.name = name;
    }
    public Student(String name,String age,String gender){
        this.name = name;
        this.age = age;
        this.gender = gender;

    }

    @Override
    public String toString() {
        return "学生姓名: " + name + ", 学生年龄: " + age + ", 学生性别 " +  gender;
    }

    @Override
    public boolean equals(Object obj) {
        Student stu = (Student)obj;
        if (this.name.equals(stu.getName())){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return this.name.hashCode();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
}
